﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using SaludOcupacional.Controller;
using SaludOcupacional.DataAccess;
using SaludOcupacional.Model;
using System.Collections.ObjectModel;

namespace SaludOcupacional
{
    /// <summary>
    /// Interaction logic for GestionEmpleados.xaml
    /// </summary>
    public partial class GestionEmpleados : Window
    {
        private string ci = "";


        public GestionEmpleados()
        {
            InitializeComponent();
        }

        private void comboBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {

        }

        private void button5_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }

        private void tabControl2_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {

        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            rCodigo.Text = "";
            rCi.Text = "";
            rSeguro.Text = "";
            rExp.Text = "";
            rNombre.Text = "";
            rNacimiento.Text = "";
            rPaterno.Text = "";
            rMaterno.Text = "";
            rTelefono.Text = "";
            rCelular.Text = "";
            rEstado.Text = "";
            rSangre.Text = "";
            rConstitucion.Text = "";
            rPuestoTrabajo.Text = "";
            rFechaIngreso.Text = "";
            rFechaTraslado.Text = "";
            rFechaSalida.Text = "";
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            int telefono;
            int celular;
            try
            {
                EmpleadoManager.ValidarNuevoEmpleado(rCodigo.Text, rCi.Text, rSeguro.Text, rNombre.Text,
                                                      rPaterno.Text, rMaterno.Text);

                if (rTelefono.Text == "")
                    telefono = 0;
                else
                    telefono = Convert.ToInt32(rTelefono.Text);
                if (rCelular.Text == "")
                    celular = 0;
                else
                    celular = Convert.ToInt32(rCelular.Text);

                Empleado empleado = new Empleado(Convert.ToInt32(rCi.Text), 0, Convert.ToInt32(rCodigo.Text), Convert.ToInt32(rSeguro.Text), rExp.Text, rNombre.Text, rPaterno.Text, rMaterno.Text, rNacimiento.Text, telefono, celular, rEstado.Text, rSangre.Text, rConstitucion.Text);

                DatosIngreso datosIngreso = new DatosIngreso(Convert.ToInt32(rCi.Text), rPuestoTrabajo.Text, rFechaIngreso.Text, rFechaTraslado.Text, rFechaSalida.Text,0);

                EmpleadoManager.CreateEmpleado(empleado);
                DatosIngresoManager.RegistrarDatosIngreso(datosIngreso);

                MessageBox.Show("EMPLEADO CREADO CON EXITO!");

                rCodigo.Text = "";
                rCi.Text = "";
                rSeguro.Text = "";
                rExp.Text = "";
                rNombre.Text = "";
                rNacimiento.Text = "";
                rPaterno.Text = "";
                rMaterno.Text = "";
                rTelefono.Text = "";
                rCelular.Text = "";
                rEstado.Text = "";
                rSangre.Text = "";
                rConstitucion.Text = "";
                rPuestoTrabajo.Text = "";
                rFechaIngreso.Text = "";
                rFechaTraslado.Text = "";
                rFechaSalida.Text = "";
                


            }
            catch (Exception ex)
            {

                MessageBox.Show("Error: " + ex.Message);
            }
        }

        private void rTelefono_TextChanged(object sender, TextChangedEventArgs e)
        {
            int number;
            try
            {
                if (rTelefono.Text != "")
                {
                    number = Convert.ToInt32(rTelefono.Text);
                }
            }
            catch (Exception)
            {
                MessageBox.Show("El Numero de Telefono debe Ser Numerico!");
                rTelefono.Text = "";
            }
        }

        private void rCelular_TextChanged(object sender, TextChangedEventArgs e)
        {
            int number;
            try
            {
                if (rCelular.Text != "")
                {
                    number = Convert.ToInt32(rCelular.Text);
                }
            }
            catch (Exception)
            {
                MessageBox.Show("El Numero de Telefono debe Ser Numerico!");
                rCelular.Text = "";
            }
        }

        private void button6_Click(object sender, RoutedEventArgs e)
        {
            if (EmpleadoManager.GetEmpleadoByCi(rCi.Text) == null )
            {
                MessageBox.Show("CI Valido!!");
                ci = rCi.Text;
                rVerificar.Visibility = Visibility.Hidden;
            }
            else
            {
                MessageBox.Show("Error: " + "El Carnet de Identidad ya esta En Uso Ya esta En Uso!!");
            }
        }

        private void rCi_TextChanged(object sender, TextChangedEventArgs e)
        {
            int number;
            try
            {
                if (rCi.Text != "")
                {
                    number = Convert.ToInt32(rCi.Text);
                }
            }
            catch (Exception)
            {
                MessageBox.Show("La Cedula De identidad debe Ser Numerico!");
                rCi.Text = "";
            }
            if (rCi.Text != "" || ci != rCi.Text)
            {
                rVerificar.Visibility = Visibility.Visible;
            }
        }

        private void rCodigo_TextChanged(object sender, TextChangedEventArgs e)
        {
            int number;
            try
            {
                if (rCodigo.Text != "")
                {
                    number = Convert.ToInt32(rCodigo.Text);
                }
            }
            catch (Exception)
            {
                MessageBox.Show("El Codigo debe Ser Numerico!");
                rCodigo.Text = "";
            }
        }

        private void rSeguro_TextChanged(object sender, TextChangedEventArgs e)
        {
            int number;
            try
            {
                if (rSeguro.Text != "")
                {
                    number = Convert.ToInt32(rSeguro.Text);
                }
            }
            catch (Exception)
            {
                MessageBox.Show("El Numero de Seguro debe Ser Numerico!");
                rSeguro.Text = "";
            }
        }



        

        





        



        private void button3_Click(object sender, RoutedEventArgs e)
        {
            if (eNombreCompleto.Text == "")
            {
                MessageBox.Show("Ingrese El Nombre!");
            }
            else
            {
                Collection<Empleado> lista = new Collection<Empleado>();
                lista = EmpleadoManager.BuscarEmpleadoPorNombre(eNombreCompleto.Text);

                if (lista.Count > 0)
                {
                    int i = 0;
                    Codigo1.Visibility = Visibility.Visible;
                    Codigo1.Content = lista[i].Codigo;
                    Nombre1.Visibility = Visibility.Visible;
                    Nombre1.Content = lista[i].Nombre + " " + lista[i].ApellidoPaterno + " " + lista[i].ApellidoMaterno;
                    Seguro1.Visibility = Visibility.Visible;
                    Seguro1.Content = lista[i].NumeroSeguro;
                    Ci1.Visibility = Visibility.Visible;
                    Ci1.Content = lista[i].Ci;

                    ver1.Visibility = Visibility.Visible;
                    editar1.Visibility = Visibility.Visible;
                    i++;

                    if (lista.Count > 1)
                    {
                        Codigo2.Visibility = Visibility.Visible;
                        Codigo2.Content = lista[i].Codigo;
                        Nombre2.Visibility = Visibility.Visible;
                        Nombre2.Content = lista[i].Nombre + " " + lista[i].ApellidoPaterno + " " + lista[i].ApellidoMaterno;
                        Seguro2.Visibility = Visibility.Visible;
                        Seguro2.Content = lista[i].NumeroSeguro;
                        Ci2.Visibility = Visibility.Visible;
                        Ci2.Content = lista[i].Ci;

                        ver2.Visibility = Visibility.Visible;
                        editar2.Visibility = Visibility.Visible;
                    }

                    else
                    {
                        Codigo2.Visibility = Visibility.Hidden;
                        Seguro2.Visibility = Visibility.Hidden;
                        Nombre2.Visibility = Visibility.Hidden;
                        Ci2.Visibility = Visibility.Hidden;
                        ver2.Visibility = Visibility.Hidden;
                        editar2.Visibility = Visibility.Hidden;

                        Codigo3.Visibility = Visibility.Hidden;
                        Seguro3.Visibility = Visibility.Hidden;
                        Nombre3.Visibility = Visibility.Hidden;
                        Ci3.Visibility = Visibility.Hidden;
                        ver3.Visibility = Visibility.Hidden;
                        editar3.Visibility = Visibility.Hidden;

                        Codigo4.Visibility = Visibility.Hidden;
                        Seguro4.Visibility = Visibility.Hidden;
                        Nombre4.Visibility = Visibility.Hidden;
                        Ci4.Visibility = Visibility.Hidden;
                        ver4.Visibility = Visibility.Hidden;
                        editar4.Visibility = Visibility.Hidden;

                        Codigo5.Visibility = Visibility.Hidden;
                        Seguro5.Visibility = Visibility.Hidden;
                        Nombre5.Visibility = Visibility.Hidden;
                        Ci5.Visibility = Visibility.Hidden;
                        ver5.Visibility = Visibility.Hidden;
                        editar5.Visibility = Visibility.Hidden;

                        Codigo6.Visibility = Visibility.Hidden;
                        Seguro6.Visibility = Visibility.Hidden;
                        Nombre6.Visibility = Visibility.Hidden;
                        Ci6.Visibility = Visibility.Hidden;
                        ver6.Visibility = Visibility.Hidden;
                        editar6.Visibility = Visibility.Hidden;

                        Codigo7.Visibility = Visibility.Hidden;
                        Seguro7.Visibility = Visibility.Hidden;
                        Nombre7.Visibility = Visibility.Hidden;
                        Ci7.Visibility = Visibility.Hidden;
                        ver7.Visibility = Visibility.Hidden;
                        editar7.Visibility = Visibility.Hidden;

                        Codigo8.Visibility = Visibility.Hidden;
                        Seguro8.Visibility = Visibility.Hidden;
                        Nombre8.Visibility = Visibility.Hidden;
                        Ci8.Visibility = Visibility.Hidden;
                        ver8.Visibility = Visibility.Hidden;
                        editar8.Visibility = Visibility.Hidden;

                    }
                    i++;
                    if (lista.Count > 2)
                    {
                        Codigo3.Visibility = Visibility.Visible;
                        Codigo3.Content = lista[i].Codigo;
                        Nombre3.Visibility = Visibility.Visible;
                        Nombre3.Content = lista[i].Nombre + " " + lista[i].ApellidoPaterno + " " + lista[i].ApellidoMaterno;
                        Seguro3.Visibility = Visibility.Visible;
                        Seguro3.Content = lista[i].NumeroSeguro;
                        Ci3.Visibility = Visibility.Visible;
                        Ci3.Content = lista[i].Ci;

                        ver3.Visibility = Visibility.Visible;
                        editar3.Visibility = Visibility.Visible;
                    }
                    else
                    {

                        Codigo3.Visibility = Visibility.Hidden;
                        Seguro3.Visibility = Visibility.Hidden;
                        Nombre3.Visibility = Visibility.Hidden;
                        Ci3.Visibility = Visibility.Hidden;
                        ver3.Visibility = Visibility.Hidden;
                        editar3.Visibility = Visibility.Hidden;

                        Codigo4.Visibility = Visibility.Hidden;
                        Seguro4.Visibility = Visibility.Hidden;
                        Nombre4.Visibility = Visibility.Hidden;
                        Ci4.Visibility = Visibility.Hidden;
                        ver4.Visibility = Visibility.Hidden;
                        editar4.Visibility = Visibility.Hidden;

                        Codigo5.Visibility = Visibility.Hidden;
                        Seguro5.Visibility = Visibility.Hidden;
                        Nombre5.Visibility = Visibility.Hidden;
                        Ci5.Visibility = Visibility.Hidden;
                        ver5.Visibility = Visibility.Hidden;
                        editar5.Visibility = Visibility.Hidden;

                        Codigo6.Visibility = Visibility.Hidden;
                        Seguro6.Visibility = Visibility.Hidden;
                        Nombre6.Visibility = Visibility.Hidden;
                        Ci6.Visibility = Visibility.Hidden;
                        ver6.Visibility = Visibility.Hidden;
                        editar6.Visibility = Visibility.Hidden;

                        Codigo7.Visibility = Visibility.Hidden;
                        Seguro7.Visibility = Visibility.Hidden;
                        Nombre7.Visibility = Visibility.Hidden;
                        Ci7.Visibility = Visibility.Hidden;
                        ver7.Visibility = Visibility.Hidden;
                        editar7.Visibility = Visibility.Hidden;

                        Codigo8.Visibility = Visibility.Hidden;
                        Seguro8.Visibility = Visibility.Hidden;
                        Nombre8.Visibility = Visibility.Hidden;
                        Ci8.Visibility = Visibility.Hidden;
                        ver8.Visibility = Visibility.Hidden;
                        editar8.Visibility = Visibility.Hidden;
                    }
                    i++;
                    if (lista.Count > 3)
                    {
                        Codigo4.Visibility = Visibility.Visible;
                        Codigo4.Content = lista[i].Codigo;
                        Nombre4.Visibility = Visibility.Visible;
                        Nombre4.Content = lista[i].Nombre + " " + lista[i].ApellidoPaterno + " " + lista[i].ApellidoMaterno;
                        Seguro4.Visibility = Visibility.Visible;
                        Seguro4.Content = lista[i].NumeroSeguro;
                        Ci4.Visibility = Visibility.Visible;
                        Ci4.Content = lista[i].Ci;

                        ver4.Visibility = Visibility.Visible;
                        editar4.Visibility = Visibility.Visible;
                    }
                    else
                    {


                        Codigo4.Visibility = Visibility.Hidden;
                        Seguro4.Visibility = Visibility.Hidden;
                        Nombre4.Visibility = Visibility.Hidden;
                        Ci4.Visibility = Visibility.Hidden;
                        ver4.Visibility = Visibility.Hidden;
                        editar4.Visibility = Visibility.Hidden;

                        Codigo5.Visibility = Visibility.Hidden;
                        Seguro5.Visibility = Visibility.Hidden;
                        Nombre5.Visibility = Visibility.Hidden;
                        Ci5.Visibility = Visibility.Hidden;
                        ver5.Visibility = Visibility.Hidden;
                        editar5.Visibility = Visibility.Hidden;

                        Codigo6.Visibility = Visibility.Hidden;
                        Seguro6.Visibility = Visibility.Hidden;
                        Nombre6.Visibility = Visibility.Hidden;
                        Ci6.Visibility = Visibility.Hidden;
                        ver6.Visibility = Visibility.Hidden;
                        editar6.Visibility = Visibility.Hidden;

                        Codigo7.Visibility = Visibility.Hidden;
                        Seguro7.Visibility = Visibility.Hidden;
                        Nombre7.Visibility = Visibility.Hidden;
                        Ci7.Visibility = Visibility.Hidden;
                        ver7.Visibility = Visibility.Hidden;
                        editar7.Visibility = Visibility.Hidden;

                        Codigo8.Visibility = Visibility.Hidden;
                        Seguro8.Visibility = Visibility.Hidden;
                        Nombre8.Visibility = Visibility.Hidden;
                        Ci8.Visibility = Visibility.Hidden;
                        ver8.Visibility = Visibility.Hidden;
                        editar8.Visibility = Visibility.Hidden;
                    }
                    i++;
                    if (lista.Count > 4)
                    {
                        Codigo5.Visibility = Visibility.Visible;
                        Codigo5.Content = lista[i].Codigo;
                        Nombre5.Visibility = Visibility.Visible;
                        Nombre5.Content = lista[i].Nombre + " " + lista[i].ApellidoPaterno + " " + lista[i].ApellidoMaterno;
                        Seguro5.Visibility = Visibility.Visible;
                        Seguro5.Content = lista[i].NumeroSeguro;
                        Ci5.Visibility = Visibility.Visible;
                        Ci5.Content = lista[i].Ci;

                        ver5.Visibility = Visibility.Visible;
                        editar5.Visibility = Visibility.Visible; ;
                    }
                    else
                    {

                        Codigo5.Visibility = Visibility.Hidden;
                        Seguro5.Visibility = Visibility.Hidden;
                        Nombre5.Visibility = Visibility.Hidden;
                        Ci5.Visibility = Visibility.Hidden;
                        ver5.Visibility = Visibility.Hidden;
                        editar5.Visibility = Visibility.Hidden;

                        Codigo6.Visibility = Visibility.Hidden;
                        Seguro6.Visibility = Visibility.Hidden;
                        Nombre6.Visibility = Visibility.Hidden;
                        Ci6.Visibility = Visibility.Hidden;
                        ver6.Visibility = Visibility.Hidden;
                        editar6.Visibility = Visibility.Hidden;

                        Codigo7.Visibility = Visibility.Hidden;
                        Seguro7.Visibility = Visibility.Hidden;
                        Nombre7.Visibility = Visibility.Hidden;
                        Ci7.Visibility = Visibility.Hidden;
                        ver7.Visibility = Visibility.Hidden;
                        editar7.Visibility = Visibility.Hidden;

                        Codigo8.Visibility = Visibility.Hidden;
                        Seguro8.Visibility = Visibility.Hidden;
                        Nombre8.Visibility = Visibility.Hidden;
                        Ci8.Visibility = Visibility.Hidden;
                        ver8.Visibility = Visibility.Hidden;
                        editar8.Visibility = Visibility.Hidden;
                    }
                    i++;
                    if (lista.Count > 5)
                    {
                        Codigo6.Visibility = Visibility.Visible;
                        Codigo6.Content = lista[i].Codigo;
                        Nombre6.Visibility = Visibility.Visible;
                        Nombre6.Content = lista[i].Nombre + " " + lista[i].ApellidoPaterno + " " + lista[i].ApellidoMaterno;
                        Seguro6.Visibility = Visibility.Visible;
                        Seguro6.Content = lista[i].NumeroSeguro;
                        Ci6.Visibility = Visibility.Visible;
                        Ci6.Content = lista[i].Ci;

                        ver6.Visibility = Visibility.Visible;
                        editar6.Visibility = Visibility.Visible;
                    }
                    else
                    {

                        Codigo6.Visibility = Visibility.Hidden;
                        Seguro6.Visibility = Visibility.Hidden;
                        Nombre6.Visibility = Visibility.Hidden;
                        Ci6.Visibility = Visibility.Hidden;
                        ver6.Visibility = Visibility.Hidden;
                        editar6.Visibility = Visibility.Hidden;

                        Codigo7.Visibility = Visibility.Hidden;
                        Seguro7.Visibility = Visibility.Hidden;
                        Nombre7.Visibility = Visibility.Hidden;
                        Ci7.Visibility = Visibility.Hidden;
                        ver7.Visibility = Visibility.Hidden;
                        editar7.Visibility = Visibility.Hidden;

                        Codigo8.Visibility = Visibility.Hidden;
                        Seguro8.Visibility = Visibility.Hidden;
                        Nombre8.Visibility = Visibility.Hidden;
                        Ci8.Visibility = Visibility.Hidden;
                        ver8.Visibility = Visibility.Hidden;
                        editar8.Visibility = Visibility.Hidden;
                    }
                    i++;
                    if (lista.Count > 6)
                    {
                        Codigo7.Visibility = Visibility.Visible;
                        Codigo7.Content = lista[i].Codigo;
                        Nombre7.Visibility = Visibility.Visible;
                        Nombre7.Content = lista[i].Nombre + " " + lista[i].ApellidoPaterno + " " + lista[i].ApellidoMaterno;
                        Seguro7.Visibility = Visibility.Visible;
                        Seguro7.Content = lista[i].NumeroSeguro;
                        Ci7.Visibility = Visibility.Visible;
                        Ci7.Content = lista[i].Ci;

                        ver7.Visibility = Visibility.Visible;
                        editar7.Visibility = Visibility.Visible;
                    }
                    else
                    {

                        Codigo7.Visibility = Visibility.Hidden;
                        Seguro7.Visibility = Visibility.Hidden;
                        Nombre7.Visibility = Visibility.Hidden;
                        Ci7.Visibility = Visibility.Hidden;
                        ver7.Visibility = Visibility.Hidden;
                        editar7.Visibility = Visibility.Hidden;

                        Codigo8.Visibility = Visibility.Hidden;
                        Seguro8.Visibility = Visibility.Hidden;
                        Nombre8.Visibility = Visibility.Hidden;
                        Ci8.Visibility = Visibility.Hidden;
                        ver8.Visibility = Visibility.Hidden;
                        editar8.Visibility = Visibility.Hidden;
                    }

                    i++;
                    if (lista.Count > 7)
                    {
                        Codigo8.Visibility = Visibility.Visible;
                        Codigo8.Content = lista[i].Codigo;
                        Nombre8.Visibility = Visibility.Visible;
                        Nombre8.Content = lista[i].Nombre + " " + lista[i].ApellidoPaterno + " " + lista[i].ApellidoMaterno;
                        Seguro8.Visibility = Visibility.Visible;
                        Seguro8.Content = lista[i].NumeroSeguro;
                        Ci8.Visibility = Visibility.Visible;
                        Ci8.Content = lista[i].Ci;

                        ver8.Visibility = Visibility.Visible;
                        editar8.Visibility = Visibility.Visible;
                    }
                    else
                    {

                        Codigo8.Visibility = Visibility.Hidden;
                        Seguro8.Visibility = Visibility.Hidden;
                        Nombre8.Visibility = Visibility.Hidden;
                        Ci8.Visibility = Visibility.Hidden;
                        ver8.Visibility = Visibility.Hidden;
                        editar8.Visibility = Visibility.Hidden;
                    }

                }
                else
                {
                    Codigo1.Visibility = Visibility.Hidden;
                    Seguro1.Visibility = Visibility.Hidden;
                    Nombre1.Visibility = Visibility.Hidden;
                    Ci1.Visibility = Visibility.Hidden;
                    ver1.Visibility = Visibility.Hidden;
                    editar1.Visibility = Visibility.Hidden;

                    Codigo2.Visibility = Visibility.Hidden;
                    Seguro2.Visibility = Visibility.Hidden;
                    Nombre2.Visibility = Visibility.Hidden;
                    Ci2.Visibility = Visibility.Hidden;
                    ver2.Visibility = Visibility.Hidden;
                    editar2.Visibility = Visibility.Hidden;

                    Codigo3.Visibility = Visibility.Hidden;
                    Seguro3.Visibility = Visibility.Hidden;
                    Nombre3.Visibility = Visibility.Hidden;
                    Ci3.Visibility = Visibility.Hidden;
                    ver3.Visibility = Visibility.Hidden;
                    editar3.Visibility = Visibility.Hidden;

                    Codigo4.Visibility = Visibility.Hidden;
                    Seguro4.Visibility = Visibility.Hidden;
                    Nombre4.Visibility = Visibility.Hidden;
                    Ci4.Visibility = Visibility.Hidden;
                    ver4.Visibility = Visibility.Hidden;
                    editar4.Visibility = Visibility.Hidden;

                    Codigo5.Visibility = Visibility.Hidden;
                    Seguro5.Visibility = Visibility.Hidden;
                    Nombre5.Visibility = Visibility.Hidden;
                    Ci5.Visibility = Visibility.Hidden;
                    ver5.Visibility = Visibility.Hidden;
                    editar5.Visibility = Visibility.Hidden;

                    Codigo6.Visibility = Visibility.Hidden;
                    Seguro6.Visibility = Visibility.Hidden;
                    Nombre6.Visibility = Visibility.Hidden;
                    Ci6.Visibility = Visibility.Hidden;
                    ver6.Visibility = Visibility.Hidden;
                    editar6.Visibility = Visibility.Hidden;

                    Codigo7.Visibility = Visibility.Hidden;
                    Seguro7.Visibility = Visibility.Hidden;
                    Nombre7.Visibility = Visibility.Hidden;
                    Ci7.Visibility = Visibility.Hidden;
                    ver7.Visibility = Visibility.Hidden;
                    editar7.Visibility = Visibility.Hidden;

                    Codigo8.Visibility = Visibility.Hidden;
                    Seguro8.Visibility = Visibility.Hidden;
                    Nombre8.Visibility = Visibility.Hidden;
                    Ci8.Visibility = Visibility.Hidden;
                    ver8.Visibility = Visibility.Hidden;
                    editar8.Visibility = Visibility.Hidden;



                    MessageBox.Show("No se encontro Resultados!");
                }
            }
        }

        

        

        private void editar1_Click(object sender, RoutedEventArgs e)
        {
            EditarEmpleado editarEmpleado = new EditarEmpleado(Convert.ToInt32(Ci1.Content));
            editarEmpleado.Show();
        }

        private void editar2_Click(object sender, RoutedEventArgs e)
        {
            EditarEmpleado editarEmpleado = new EditarEmpleado(Convert.ToInt32(Ci2.Content));
            editarEmpleado.Show();
        }

        private void editar3_Click(object sender, RoutedEventArgs e)
        {
            EditarEmpleado editarEmpleado = new EditarEmpleado(Convert.ToInt32(Ci3.Content));
            editarEmpleado.Show();
        }

        private void editar4_Click(object sender, RoutedEventArgs e)
        {
            EditarEmpleado editarEmpleado = new EditarEmpleado(Convert.ToInt32(Ci4.Content));
            editarEmpleado.Show();
        }

        private void editar5_Click(object sender, RoutedEventArgs e)
        {
            EditarEmpleado editarEmpleado = new EditarEmpleado(Convert.ToInt32(Ci5.Content));
            editarEmpleado.Show();
        }

        private void editar6_Click(object sender, RoutedEventArgs e)
        {
            EditarEmpleado editarEmpleado = new EditarEmpleado(Convert.ToInt32(Ci6.Content));
            editarEmpleado.Show();
        }

        private void editar7_Click(object sender, RoutedEventArgs e)
        {
            EditarEmpleado editarEmpleado = new EditarEmpleado(Convert.ToInt32(Ci7.Content));
            editarEmpleado.Show();
        }

        private void editar8_Click(object sender, RoutedEventArgs e)
        {
            EditarEmpleado editarEmpleado = new EditarEmpleado(Convert.ToInt32(Ci8.Content));
            editarEmpleado.Show();
        }

        private void ver1_Click(object sender, RoutedEventArgs e)
        {
            VerEmpleado editarEmpleado = new VerEmpleado(Convert.ToInt32(Ci1.Content));
            editarEmpleado.Show();
        }

        private void ver2_Click(object sender, RoutedEventArgs e)
        {
            VerEmpleado editarEmpleado = new VerEmpleado(Convert.ToInt32(Ci2.Content));
            editarEmpleado.Show();
        }

        private void ver3_Click(object sender, RoutedEventArgs e)
        {
            VerEmpleado editarEmpleado = new VerEmpleado(Convert.ToInt32(Ci3.Content));
            editarEmpleado.Show();
        }

        private void ver4_Click(object sender, RoutedEventArgs e)
        {
            VerEmpleado editarEmpleado = new VerEmpleado(Convert.ToInt32(Ci4.Content));
            editarEmpleado.Show();
        }

        private void ver5_Click(object sender, RoutedEventArgs e)
        {
            VerEmpleado editarEmpleado = new VerEmpleado(Convert.ToInt32(Ci5.Content));
            editarEmpleado.Show();
        }

        private void ver6_Click(object sender, RoutedEventArgs e)
        {
            VerEmpleado editarEmpleado = new VerEmpleado(Convert.ToInt32(Ci6.Content));
            editarEmpleado.Show();
        }

        private void ver7_Click(object sender, RoutedEventArgs e)
        {
            VerEmpleado editarEmpleado = new VerEmpleado(Convert.ToInt32(Ci7.Content));
            editarEmpleado.Show();
        }

        private void ver8_Click(object sender, RoutedEventArgs e)
        {
            VerEmpleado editarEmpleado = new VerEmpleado(Convert.ToInt32(Ci8.Content));
            editarEmpleado.Show();
        }
    }
}
